import {withInstall} from "@jzl/utils";

// 自定义样式， 后引入，防止被 comps 中覆盖
import "./src/views/css/index.scss";
import './src/views/css/tailwind.css'

import JzlPageBuilderH5 from './src/views/builder-h5.vue';
import JzlPageBuilderWeb from './src/views/builder-web.vue';
import JzlPageBuilderScreen from './src/views/builder-screen.vue';

withInstall(JzlPageBuilderH5)
withInstall(JzlPageBuilderWeb)
withInstall(JzlPageBuilderScreen)

const components = {
  JzlPageBuilderH5,
  JzlPageBuilderWeb,
  JzlPageBuilderScreen
}

export {
  JzlPageBuilderH5,
  JzlPageBuilderWeb,
  JzlPageBuilderScreen
}

const install = (app) => {
  for (let compName in components) {
    let Comp = components[compName];
    if (components.hasOwnProperty(compName)) {
      app.use(Comp)
    }
  }
}

// 默认导出
export default {
  install
}
